package com.pearlsoft.webapp.rms.orgmgr.service;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.pearlsoft.webapp.core.dao.RecrodRowMapper;
import com.pearlsoft.webapp.core.dataset.Record;
import com.pearlsoft.webapp.core.dataset.SimpleRecord;

public class OrgMgrRowMapperHelper {
	
	public static RecrodRowMapper<Record> generalRowMapper(){
		return new  RecrodRowMapper<Record>(){
			@Override
			public Record mapRow(ResultSet rs, int rowNum)
					throws SQLException {
				SimpleRecord recrod = new SimpleRecord();
			
				recrod.setValue("ORG_NAME", rs.getString(1));
				recrod.setValue("ORG_FULL_NAME", rs.getString(2));
				recrod.setValue("ORG_DESCRIBE", rs.getString(3));
			
				return recrod;
			}
		};
	}

}
